package com.bible.fire.util;

import android.content.Context;
import android.graphics.Color;
import android.view.Gravity;
import android.widget.TextView;
import android.widget.Toast;

public class ToastUtil {
	
	/**
	 * 自定义样式来设置toast的显示
	 * @param context
	 * @param msg
	 */
	public static void showMsg(Context context, String msg){
		TextView tv = new TextView( context );
		tv.setText(msg);
		tv.setTextSize( 18 );
		tv.setTextColor( Color.WHITE );
		tv.setWidth( 1000 );
		tv.setHeight( 100 );
		tv.setGravity( Gravity.CENTER );
		tv.setBackgroundColor(Color.BLACK );
		Toast toast = new Toast( context );
		toast.setGravity(Gravity.CENTER, 0, 0);
		toast.setDuration( Toast.LENGTH_SHORT );		
		toast.setView( tv );
		toast.show();
	}

}
